package com.zhongge.test;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName BasicController
 * @Description TODO
 * @Author zhongge
 * @Version 1.0
 */
@SuppressWarnings("all")
@Controller
@RequestMapping("/hello")
public class BasicController {
    @RequestMapping("/register")
    public String register() {
        return "/login.html";
    }
    @GetMapping("/save")
    public String login(String name, String password) {
        if ("admin".equals(name) && "123456".equals(password)) {
            return "/success.html";
        }else {
            return "/fail.html";
        }
    }
}
